﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using CourseScheduling.DataAccess;

namespace CourseScheduling
{
    public partial class CoursePreferenceConfirmation : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            Session["ddlTerm"] = String.Empty;
            Session["ddlCourseRelease"] = String.Empty;
            Session["ddlSabbatical"] = String.Empty;
            Session["ddlYear"] = String.Empty;
            Session["ddlCourseNum"] = String.Empty;
            Session["ddlCourses"] = String.Empty;
            Session["ddlLeave"] = String.Empty;
            Session["ddlCoursePreference"] = String.Empty;
            Session["ddlDaysOfWeek"] = String.Empty;
            Session["ddlTimeOfDay"] = String.Empty;
            Session["ddlMorning"] = String.Empty;
            Session["ddlAfternoon"] = String.Empty;
            Session["ddlEvening"] = String.Empty;

            var prefs = Session["CoursePreferences"] as List<CSCoursePreference>;
            if (prefs != null)
            {
                prefs.Clear();
            }
        }

        protected void tnReturnHome_Click(object sender, EventArgs e)
        {
            Response.Redirect("Default.aspx");
        }
    }
}